 import * as type from './type'
 import state from './state'
 import _ from 'lodash'

 const reducers = ( proviousState=state,action ) => {

   let newState = _.cloneDeep( proviousState ) //深拷贝
   

   switch (action.type) {
      case type.GET_DATA:
         newState.data = action.payload;
         break;
      case type.GET_Details_DATA:
         newState.tuan_details_data = action.payload;
         break;
   
      default:
         break;
   }


    return newState
 }

 export default reducers;

 